package com.xkcoding.orm.mybatis.plus.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xkcoding.orm.mybatis.plus.entity.User;
import com.xkcoding.orm.mybatis.plus.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xuchao
 * @date 2021/12/01
 * @desc
 */
@RestController
@RequestMapping("/laoxu")
@Slf4j
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("/user")
    public Object idCardOcr(HttpServletRequest servletRequest) {
        QueryWrapper<User> id = new QueryWrapper<User>().eq("id", 1);
        return userService.getOne(id);
    }
}
